// pages/industry/industry.js
var app = getApp();
Page({

	/**
	 * 页面的初始数据
	 */
	data: {
		active:''
	},

	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad: function (options) {
		  var that = this;
		  app.apiGet(app.apiList.industry,{},function(res){
			if(res.code == 200){
				that.setData({
					industryList: res.data,
					active: options.index
				})
			}
		  })
	},

	checkItemTap: function (e) {
		var itemChild = e.currentTarget.dataset.child;
		this.setData({
			active: itemChild.id
		})
		var pages = getCurrentPages();
		var curPage = pages[pages.length - 2];
		curPage.setData({
			'positionObj.industry': itemChild
		});
		setTimeout(function(){
			wx.navigateBack({

			})
		},500)
		
	},
	//share 统一分享
	onShareAppMessage: function (res) {
		if (res.from === 'button') {
			// 来自页面内转发按钮
			console.log(res.target)
		}
		return {
			title: '财咖｜会计招聘找工作',
			path: '/pages/index/index',
			imageUrl: '/images/share.jpg',
			success: function (res) {
				// 转发成功
			},
			fail: function (res) {
				// 转发失败
			}
		}
	},

})